#!/usr/bin/env python3
# encoding: utf-8

"""
@version: 1.0
@author: 周永波
@file: ResultInfo.py
@time: 2020/7/18 15:46
"""

class ResultInfo:

    def __init__(self, code: int, message: str, data={}) -> None:
        self.code = code
        self.message = message
        self.data = data


    @staticmethod
    def success(data={}):
        return ResultInfo(100, "", data)

    @staticmethod
    def error(code: int, message: str):
        return ResultInfo(code,message)

